package xyz.jangle.design.adapter;


public class AppMain8 {

	public static void main(String[] args) {
		Target target;		//目标接口
		AdapteeImpl adapteeImpl = new AdapteeImpl();	//被适配者
		Adapter adapter = new Adapter(adapteeImpl);		//将适配者挂载到适配器上
		target = adapter;	//适配目标
		target.methodA();	//执行
	}
}
class AdapteeImpl implements Adaptee {
	
	@Override
	public void methodB() {
		System.out.println("这是被适配者的方法B");
	}
}
